package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpActivityBoardAssetEditPageUtil extends SeleniumPageUtil {
	public final static By ABAE_LINK_SAVE = By.id("AssetHdr1_btnSave");
	public final static By ABAE_LINK_CLOSE = By.id("AssetHdr1_btnDone");
	public final static By ABAE_LINK_NOTE = By.id("AssetHdr1_DocsNotes1_lnkNotes");
	public final static By ABAE_LINK_FILES = By.id("AssetHdr1_DocsNotes1_lnkFiles");
	
	// asset name change link
	public final static By ABAE_LINK_CHANGE = By.id("AssetHdr1_btnChangeAssetName");
	// tabs
	public final static By ABAE_LINK_GENERAL = By.id("btnTab1");
	public final static By ABAE_LINK_CONFIGURATION = By.id("btnTab2");
	public final static By ABAE_LINK_CONTRACTS = By.id("btnTab3");
	public final static By ABAE_LINK_WARRANTY = By.id("btnTab4");
	public final static By ABAE_LINK_INCIDENTS = By.id("btnTab5");
	public final static By ABAE_LINK_LEASES = By.id("btnTab6");
	public final static By ABAE_LINK_RETIRE = By.id("btnTab7");
//	public final static By ABAE_LINK_VIRTUAL = By.id("btnTab8");
	public final static By ABAE_LINK_NOTES = By.id("btnTab9");
	public final static By ABAE_LINK_FEATURES = By.id("btnTab10");
	public final static By ABAE_LINK_ATTACHMENTS = By.id("btnTab11");
	
	public static void waitForPageToLoad(){
		SeleniumUtil.waitOnElements(new By[]{
				ABAE_LINK_SAVE, ABAE_LINK_CLOSE, ABAE_LINK_NOTE, ABAE_LINK_FILES, ABAE_LINK_CONFIGURATION,
				ABAE_LINK_CONTRACTS, ABAE_LINK_WARRANTY, ABAE_LINK_INCIDENTS, ABAE_LINK_LEASES, ABAE_LINK_RETIRE,
				ABAE_LINK_NOTES, ABAE_LINK_FEATURES, ABAE_LINK_ATTACHMENTS
		});
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_SAVE));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_CLOSE));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_NOTE));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_FILES));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_GENERAL));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_CONFIGURATION));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_CONTRACTS));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_WARRANTY));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_INCIDENTS));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_LEASES));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_RETIRE));
//		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_VIRTUAL));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_NOTES));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_FEATURES));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABAE_LINK_ATTACHMENTS));
	}
}
